﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using internal_website.Meta;
using internal_website.Models.Resources;

namespace internal_website.Models
{
    public class Instrument : IInstrument
    {
        #region Constructor

        public Instrument()
        {
            Compositions = new Collection<Composition>();
            Users = new Collection<User>();
        }

        #endregion

        [Key]
        public int Id { get; set; }
        public bool Active { get; set; }

        /*        #region Localized display and model validation attributes
        [Display(Name = "Instrument_Name_Display_Name", Prompt = "Instrument_Name_Display_Prompt", ResourceType = typeof(ValidationStrings))]
        [Required(ErrorMessageResourceName = "Instrument_Name_Required", ErrorMessageResourceType = typeof(ValidationStrings))]
        [LocalizedRegex("_Name_LocalizedRegex_Pattern", "Instrument_Name_LocalizedRegex_ErrorMessage", errorMessageResourceType: typeof(ValidationStrings))]
        #endregion
        */
        public string Name { get; set; }

        #region Navigation properties

        public virtual InstrumentType InstrumentType { get; set; }
        public virtual ICollection<Composition> Compositions { get; set; }
        public virtual ICollection<User> Users { get; set; }

        #endregion
    }
}